home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / Alpha.5.05.cpt / Help / Alpha Help next >
Text File  |  1992-09-06  |  54KB  |  1,400 lines

  1. ==============================================================================
  2. = Copyright © 1990, 1991, 1992 Pete Keleher. All Rights Reserved.
  3. ==============================================================================
  4.  
  5. The Author(s) of this product are in no way liable for any direct or 
  6. indirect damage caused by the product. 
  7.  
  8. You may freely copy and distribute ALPHA, but please bear in mind that 
  9. ALPHA is Shareware. If you decide to keep it, please register your copy by 
  10. sending $25 to the author. Site licences are $110. Source licenses are also 
  11. available, inquire with the author. If you include an internet (or 
  12. Compuserve) address with your registration, I will notify you when new 
  13. versions become available. Please make any check or money order out to Pete 
  14. Keleher, NOT to Rice University. 
  15.  
  16. E-mail address:     pete@rice.edu
  17. Snail-mail address: Pete Keleher
  18.                     P.O. Box 1892
  19.                     Dept. of Computer Science
  20.                     Rice University
  21.                     Houston, TX 77251-1892
  22.  
  23. I would like to start collecting user-written Tcl procs and XTCLs in 
  24. public/Alpha/contrib on cs.rice.edu. If you have written anything that 
  25. you think may be of general interest, please send it to me and I will 
  26. make it available.
  27.  
  28. Thanks to Masatsugu Nagata, Karl J. Smith and Jerry Fowler.
  29.  
  30.  
  31. WHAT TO DO:
  32.  
  33. Alpha is a very powerful, multi-purpose editor that allows any program- 
  34. or user-defined function to be bound to any keystroke, or placed into 
  35. user-defined menus. Only the "File", "Edit", and "Search" menus are 
  36. predefined and immutable. The rest are defined in the startup file 
  37. ("AlphaBits.tcl") or files sourced from inside it. 
  38.  
  39. The supported macro language is Dr. Ousterhout's Tool Command Language, Tcl 
  40. for short. See the "Help" menu for a complete definition of the language. 
  41. Alpha uses a port of Tcl done by Tim Endres for his "Tickle" application. 
  42. Therefore, Alpha supports many of the same extension as Tickle. Many of the 
  43. functions bound to keystrokes, as well as many of the functions in the 
  44. user-defined menus, are written in Tcl. 
  45.  
  46. Callable functions in Alpha come in three different flavors. First, there 
  47. are the directly-accessed Alpha functions; these are discussed in the 
  48. section entitled "Unparamed Cmds" below. These functions take no arguments.
  49.  
  50. Second, there are the Tcl-callable functions. These functions in general 
  51. take arguments, and are discussed in the "Alpha Extensions" help file 
  52. (look in the "Help" menu).
  53.  
  54. Finally, there are the Tcl functions defined with "proc". Most of Alpha's 
  55. predefined functions are in "procs.tcl", some are in "shell.tcl". 
  56.  
  57. The only way to get to know the editor and the language is to try different 
  58. things out. Play around. Choose "Misc:List Bindings" to get a listing of 
  59. all the current keystoke bindings. Look in "procs.tcl" for definitions of 
  60. the routines. Look in "AlphaBits.tcl" for definitions of the last five 
  61. menus. And finally, please feel free to send suggestions/"feature" 
  62. reports/questions to me at pete@cs.rice.edu. I am not able to answer US 
  63. postal mail, but if you send it to me I will at least read it. Have fun! 
  64.  
  65. Finally, memory usage and startup speed. Alpha uses a lot of memory, and it 
  66. takes a while to start up. One important reason for this is that the 
  67. default setup executes a large amount of Tcl code. Much of this you 
  68. probably won't need. "procs.tcl" has over 1000 lines of code it it. Much of 
  69. this you probably won't use every day, and can be cut out. "procs.tcl" 
  70. includes the file "latex.tcl", which has 600 more lines of tcl. If you 
  71. don't use these functions, change the following line in "procs.tcl":
  72.     set usingLatex 1
  73. to
  74.     set usingLatex 0
  75. The next you start up Alpha the Latex functions won't be loaded.
  76.  
  77. Additionally, "globbing" while creating file sets can take a significant 
  78. amount of time (look at the beginning of "procs.tcl").
  79.  
  80.  
  81.  
  82.  
  83. ==============================================================================
  84. = Reading and Storing Files
  85. ==============================================================================
  86. The primary method of either reading or storing files with Alpha, or any 
  87. other Mac editor, is through the GetFile and PutFile dialogs. However, 
  88. Alpha's dialogs are not exactly like those of other applications. 
  89.  
  90. The GetFile dialog has two additional items: a "Readonly" checkbox and an 
  91. "All Files" checkbox. The first allows you to open a file as read only. 
  92. Files in the readonly state can not be modified, only read. A writable file 
  93. is indicated by a pen icon to the left of the horizontal scrollbar. A 
  94. readonly file is indicated by a pen with a line through it. If you change 
  95. your mind about the file, it's readonly status can be changed by clicking 
  96. on the pen icon. 
  97.  
  98. The second checkbox, "All Files", allows Alpha to open any file rather 
  99. than just those of type 'TEXT'. The type of a file can be determined by 
  100. using the 'll' alias in the Tcl shell.
  101.  
  102.  
  103. The PutFile dialog is used to prompt the user for a new name under which to 
  104. save the contents of a window. This dialog has been enhanced by two popup 
  105. menus: "State" and "Format". "State" allows you to specify how much 
  106. information should be saved in the resource fork of files that you use. If 
  107. the state is set to "MPW", window position, current selection, tab sizes, 
  108. and font information are saved into the resource fork of your application 
  109. every time you open and close it, *even if you don't modify the file*. 
  110. Alpha still manages to coexist with build or make files because saving this 
  111. information does not change the modification date of the file. If the state 
  112. is set to "Think", neither the window position nor the current selection 
  113. are saved. If state is set to "None", no information is saved. The default 
  114. value for saved state can by changed by setting the Alpha variable 
  115. 'savedState' to "mpw", "think", or "none". Note that if a given file 
  116. already has mpw information in it when the file is open, Alpha will always 
  117. update that information when the file is closed. Note also that "marks" 
  118. are always saved in the resource fork whenever a file is saved, 
  119. regardless of the setting of the 'savedState' variable.
  120.  
  121. The "Format" menus allows the way Alpha terminates lines to be changed. 
  122. The Mac uses a carriage return to mark the end of a line, Unix uses a 
  123. linefeed, and IBM uses both (of course). Alpha can read and write any of 
  124. these formats, and can convert between them just by opening a file, 
  125. choosing "Save As", and changing the selection in this menu. Note that if 
  126. you are going to be sharing files with a Unix or IBM machine, you 
  127. probably don't want anything in your resource fork, so you'd probably 
  128. want to set 'savedState' to 'none' in your AlphaBits.tcl file.
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. ==============================================================================
  136. = Marks
  137. ==============================================================================
  138.  
  139.  
  140. Alpha allows the user to use "marks" to remember positions in files. Marks 
  141. "float". That is, if a mark is initially at position 312 and then five 
  142. characters are inserted at location 297, the mark's new value will be 317. 
  143. Alpha uses three different types of marks. 
  144.  
  145. The first is generically referred to as "the mark". The mark is set to the 
  146. current insertion point by the command 'setMark' (command-space by 
  147. default). The position in the file indicated by the blinking cursor is 
  148. referred to as the current insertion point. Many commands (such as "cut" 
  149. and "copy") can operate either on the currently selected (hilighted) text, 
  150. or the text between the current insertion point and "the mark". For 
  151. example, if you move the cursor to the beginning of the work "allybaba", 
  152. hit command-space (the status bar should say "Mark set"), move to the end 
  153. of the word and hit option-w (the status bar should say "Region copied"), 
  154. the effect is the same as if you had used the mouse to select the text and 
  155. then selected the "Copy" command from the "Edit" menu.
  156.  
  157. The second type of mark are the permanent marks. Permanent marks are set, 
  158. removed, and moved-to through the three corresponding menu items in the 
  159. "Search" menu. Permanent marks differ from the generic mark in that they 
  160. have names, there can be any number of them, and they are saved in the 
  161. resource fork if the file is subsequently saved.
  162.  
  163. The third type of mark is the temporary mark. Like permanent marks, 
  164. temporary marks can be named and there can be any number of them. Unlike 
  165. permanent marks, temporary marks do not "dirty" the file, and they aren't 
  166. saved. So far, temporary marks are used exclusively to implement higher 
  167. order functions in TCL procedures. In the 5.0 release, temporary marks are 
  168. used to implement a "mark stack" and a for loop template.
  169.  
  170.  
  171.  
  172. ==============================================================================
  173. = The Mark Stack
  174. ==============================================================================
  175.  
  176. The mark stack is a last-in-first-out (LIFO) stack of temporary marks 
  177. managed by the TCL procedures 'pushMark' and 'popMark'. 'pushMark' creates 
  178. a new temporary mark of the current insertion point and adds it on to the 
  179. top of the stack. 'popMark' removes the top mark from the stack and goes 
  180. toit. A typical use of the mark stack is a 'pushMark' at the current 
  181. position, go look somewhere else in the file, and then 'popMark' to get 
  182. back to where you were. However, the stack is recursive, so there can be 
  183. any number of 'pushMarks' before the marks start to be popped back off the 
  184. stack.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209. ==============================================================================
  210. = Templates
  211. ==============================================================================
  212.  
  213. Temporary marks can also be used to with language construct templates. The 
  214. file "template.tcl" contains an example implementing a template for C's 
  215. 'for' command. Depressing control-i will insert a template for the "for" 
  216. command into the current window. Five temporary marks are defined in the 
  217. for structure, three inside the parenthesis, one where the "for" body text 
  218. will be inserted, and one after outside the for body entirely. Depressing 
  219. control-shift-i moves the cursor to the next of the five temporary marks 
  220. allowing quick entry of the entire command.
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246. ==============================================================================
  247. = The Tool Command Language (TCL)
  248. ==============================================================================
  249.  
  250. See the TCL manual page for a complete description of TCL and it's 
  251. commands. The menu item "Misc:Tcl Man" opens this file in the default menu 
  252. configuration. Each of the Tcl commands and several sections have a mark 
  253. defined, so you can use the "Mark" titlebar menu to navigate through the 
  254. manual page.
  255.  
  256. Alpha extends the TCL command set to allow access to Alpha variables, 
  257. menus, and commands. The new commands are divided into those that take 
  258. parameters or return values, and those that do neither. The former are 
  259. called 'parameterized functions'. The following is a list of the 
  260. parameterized Alpha commands, together with their syntax:
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283. ==============================================================================
  284. = Alpha's Basic Commands
  285. ==============================================================================
  286. The following functions are called without any arguments, and as such can 
  287. be directly bound to keystrokes or put in menus. Menu "Help:Alpha Extensions" 
  288. lists a second type of Alpha function that must be called from tcl. A 
  289. final type of Alpha functions are Tcl procedures, which are explained in 
  290. "Help:Tcl Manual".
  291.  
  292. • abortEm - aborts whatever is currently happening
  293. • alphaHelp - display Alpha help.
  294. • backColor - set background color
  295. • backwardCharSelect - extends selection one char back
  296. • backwardChar - moves insertion one char back
  297. • backwardDeleteWord - deletes previous word
  298. • backwardWord - moves insertion one char back
  299. • balance - selects smallest set of parens, braces, or 
  300.   brackets that encloses the current selection
  301. • beginningBufferSelect - extend selection to the 
  302.   beginning of the buffer
  303. • beginningLineSelect - extend selection to the 
  304.   beginning of the line
  305. • beginningOfBuffer - move insertion to the beginning 
  306.   of the buffer
  307. • beginningOfLine - move insertion to the beginning of 
  308.   the line
  309. • capitalizeRegion - capitalize all words in selected 
  310.   region 
  311. • capitalizeWord - capitalize word
  312. • centerRedraw - redraw window with current line in 
  313.   the middle.
  314. • clear - clear selected text
  315. • closeAll - close all windows
  316. • copy - copy region
  317. • createTagFile - searches all files in current file set 
  318.   and saves the locations of any function declarations
  319.   in a file called 'cTAGS'.
  320. • currentPosition - displays current and total bytes.
  321. • cut - deletes and saves region
  322. • deleteChar - delete char AFTER cursor
  323. • deleteSelection - delete current position, don't save
  324. • deleteWord - delete word after cursor
  325. • downcaseRegion - changes all uppercase letters to 
  326.   lowercase in current region
  327. • downcaseWord - changes all uppercase letters to 
  328.   lowercase in current word
  329. • dumpColors - dump current foreground and background
  330.   colors into the current buffer in Alpha-readable
  331.   format.
  332. • endBufferSelect - extend selection to the end of the 
  333.   buffer
  334. • endKeyboardMacro - stop recording keyboard macro
  335. • endLineSelect - extend selection to the end of line
  336. • endOfBuffer - move insertion to the end of the buffer
  337. • endOfLine - move insertion to the end of the line
  338. • exchangePointAndmark - exchange the current 'mark' 
  339.   w/ the current insertion point
  340. • execute - prompt user for a function or macro. The 
  341.   space and tab keys act as "completion" commands.
  342. • executeKeyboardMacro - execute the current keyboard 
  343.   macro
  344. • fileInfo - prompts for a file, and displays type, 
  345.   creator, sizes of both data and resource forks, last
  346.   modification time, and creation time
  347. • fileRemove - prompts for a file, and removes it
  348. • findTag - prompt user for a function name and attempt 
  349.   to use the file 'cTAGS' to locate the function's 
  350.   definition
  351. • find - bring up the find dialog
  352. • findFile - open a file in a new window
  353. • foreColor - set foreground (text) color
  354. • forwardCharSelect - extend selection one character 
  355.   forward
  356. • forwardChar - move insertion one character forward
  357. • forwardWord - move insertion one word forward
  358. • freeMem - give a rough approximation of the current 
  359.   memory reserves of ALPHA
  360. • getAscii - displays the ASCII code for character at 
  361.   current insertion point
  362. • getPathName - present the user w/ a SFGetFIle dialog 
  363.   and paste the complete path-name of the chosen file
  364.   into the current window
  365. • gotoLine - go to a line number
  366. • gotoMark - goto named mark, use 'mark' in macros.
  367. • includeFile - expand the current selection to include 
  368.   the suffix and use the var 'includePath' to try to 
  369.   find the include file. 
  370. • indentLine - semi-intelligent indent. If cursor is
  371.   before first non-white space of line, the line is
  372.   indented and the selection is placed at the start
  373.   of the non-white space text
  374. • insertAscii - prompts for an ASCII code and inserts
  375.   into text.
  376. • insertFile - prompts for a file name and inserts the
  377.   corresponding file into the current window. Not
  378.   undoable.
  379. • insertToTop - make the line that the insertion point 
  380.   is on the first line shown, and display the current 
  381.   line number along w/ the total number of lines in file
  382. • isearch - incremental search: searches w/o a dialog,
  383.   searches as you type the search pattern. Does not do
  384.   regular expression searches. 'matchWords' 
  385.   automatically set to false.
  386. • iterationCount - allows actions to be repeated many 
  387.   times. "option-u 44 =" inserts 44 '='s into current 
  388.   window. Also can be used to execute any function or 
  389.   macro (including the keyboard macro) many times.
  390. • keyAscii - insert ascii representation (in decimal)
  391.   of the keydown event, plus a modifier string, if 
  392.   necessary.
  393. • keyCode - insert the key code along w/ a string 
  394.   representing and modifiers into the current window.
  395.   Can be used to create bindings in 'Alphabits'.
  396. • killLine - kill text from insertion point to the end 
  397.   of the line. If the line has no text, delete the line 
  398.   and move succeeding lines up one.
  399. • killWindow - kill current window
  400. • listBindings - list all current bindings.
  401. • load - loads hilited text, or entire window if 
  402.   nothing is hilited. 'load'ing means that whatever 
  403.   bindings or macro definitions are present in the 
  404.   loaded text take effect
  405. • markHilite - This is the 'Hilite' from the 'Edit'
  406.   menu. If there is a currently hilited selection, the 
  407.   selection is unhilited, leaving the mark and the 
  408.   insertion point around the old selection. If there 
  409.   is not a selection, the region between the insertion 
  410.   point and the mark is selected.
  411. • matchBrace - moves the insertion point to the 
  412.   character that matches the character after the current 
  413.   insertion point
  414. • moveInsertionHere - move the insertion point to the 
  415.   first line displayed
  416. • new - opens an untitled window
  417. • nextLineSelect - extend selection to the next line
  418. • nextLine - move insertion point to next line
  419. • nextWindow - select next window
  420. • oneSpace - converts whitespace surrounding insertion
  421.   into a single space.
  422. • openLine - insert a new line following the current 
  423.   one and move the insertion point to it
  424. • pageBack - display prev screenful, move the
  425.   insertion point if 'moveInsertion' enabled
  426. • pageForward - display next screenful, move the
  427.   insertion point if 'moveInsertion' enabled
  428. • pageSetup - display the printing PageSetup dialog.
  429. • paste - insert the last chunk of text created by 'cut' 
  430.   or 'copy'
  431. • prefixChar - used to further modify the next keystroke 
  432.   combination, in the same manner as using the shift key 
  433.   in the next keystroke
  434. • prevLineSelect - extend selection to the previous line
  435. • prevWindow - select previous window
  436. • previousLine - move insertion point to the previous 
  437.   line
  438. • print - print front window
  439. • quit - quits ALPHA
  440. • rectMarkHilite - creates a rectangular selection 
  441.   between the mark and the insertion point.
  442. • redo - redo the next action that has been undone but 
  443.   not redone
  444. • removeMark - allows marks to be removed.
  445. • repeatSearchBackward - repeat search backward
  446. • repeatSearchForward - repeat search forward
  447. • restoreVars - restore variables to saved state, 
  448.   see 'saveVars'
  449. • revert - revert the file to it's last saved version
  450. • rsearch - reverse incremental search, see 'isearch'.
  451. • save - save current window
  452. • saveAs - save current window with new name
  453. • saveVars - save variable state, see 'restoreVars'
  454. • scrollDownLine - same action as that which occurs when 
  455.   the down arrow in the vertical scrollbar is selected
  456. • scrollLeftCol - same action as that which occurs when
  457.   the left arrow in the horizontal scrollbar is selected
  458. • scrollRightCol - same action as that which occurs when
  459.   the right arrow in the horizontal scrollbar is 
  460.   selected
  461. • scrollUpLine - same action as that which occurs when 
  462.   the up arrow in the vertical scrollbar is selected
  463. • searchEnter - use current selection for future 
  464.   searches
  465. • searchNext - search next file.
  466. • searchRall - replace all further occurrences in the 
  467.   current file
  468. • searchReplace - replace the current selection
  469. • searchRfa - replace the current selection and find 
  470.   next occurrence
  471. • setMark - set the current mark to the insertion point
  472. • setFontsTabs - bring up font and tab dialog
  473. • setNamedMark - set named mark
  474. • shell - open the Tcl shell.
  475. • shiftRegionLeft - shifts the current region left a tab
  476. • shiftRegionRight - shift the current region right a 
  477.   tab
  478. • sortMarks - sorts all marks of open windows, w/o 
  479.   setting the dirty flag. If the files are saved, the 
  480.   marks will be saved in alphabetical order.
  481. • spacesToTabs - convert spaces in selection to tabs
  482. • startEscape - used to further modify the next 
  483.   keystroke combination, in the same manner as using the 
  484.   shift key in the next keystroke
  485. • startKeyboardMacro - start recording keyboard macro
  486. • tab - insert a tab
  487. • tabsToSpaces - convert tabs in selection to spaces.
  488. • tclFileCompletion - completes the previous word as a
  489.   file is in a shell window
  490. • undo - undo the last action that has not been undone
  491. • upcaseRegion - convert all lowercase letters to 
  492.   uppercase in the current region
  493. • upcaseWord - convert all lowercase letters to 
  494.   uppercase in the current word
  495. • wrap - see the section on "Fill" routines.
  496. • yank - insert the last piece of deleted text of less
  497.   than 1k. Consecutive deletes are concatenated.
  498.   together.
  499. • zapInvisibles - removes chars < ascii 32, except for
  500.   LF's and CR's.
  501. • zoom - zooms the current window
  502.  
  503. ==============================================================================
  504. = Key Bindings
  505. ==============================================================================
  506.  
  507.  
  508. Any TCL command can be bound to any single keystroke. One way to bind a 
  509. function is with a statement such as:
  510.   
  511.       bind 'c' <modifier string> funcName [<mode>]
  512.           
  513. where c is a character, <modifier string> is an optional string containing 
  514. one or more of:
  515.  
  516.       c   - command modifier
  517.       o   - option modifier
  518.       s   - shift modifier
  519.       z   - control modifier
  520.       e   - escape modifier      
  521.  
  522. Additionally, the modifier string can contain a capital letter specifying 
  523. that the binding is only activated if preceded by control and the lowercase 
  524. version of that letter. This feature allows multiple-key combinations ala 
  525. Emacs. The following line binds cmd-shift-f to the function 'forwardChar': 
  526.  
  527.  bind 'f' <cs> forwardChar 
  528.  
  529. The next line would bind the same function to C-x C-f: 
  530.  
  531.  bind 'f' <cX> forwardChar 
  532.  
  533. 'mode' is an optional parameter that specifies, when present, that the 
  534. binding is only active in a given mode, where the current mode is the 
  535. parameter to the last call of 'displayMode' (look in "procs.tcl"). Note 
  536. that given a general binding (no mode specification) and a binding specific 
  537. to the current mode, the last binding to have been created is the one found 
  538. first. 
  539.  
  540. Additionally, most keyboards have keypads and/or Function Keys. These 
  541. keys can be bound using case-insensitive numeric labels using the same 
  542. bind command as above, with the label replacing the character. For 
  543. example, to bind F1 to function 'funcName', the following would work:
  544.  
  545.     bind F1 funcName
  546.  
  547. As above, the binding can include a modifier string. The following labels 
  548. are defined for US keyboards:
  549.  
  550. Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 Help Home Pgup Del 
  551. End Pgdn Left Left Right Right Up Up Down Down Clear Kpad Kpad Kpad Kpad7 
  552. Kpad8 Kpad9 Kpad Kpad4 Kpad5 Kpad6 Kpad Kpad1 Kpad2 Kpad3 Kpad0 Kpad Enter 
  553.  
  554. The function 'listBindings' will list all of the bindings currently in 
  555. effect in a format suitable for re-loading.
  556.  
  557. The above labels may not be sufficient for all keyboards (attention 
  558. international users). If a hex number is used instead of a character inside 
  559. the single quotes, the binding is done to key codes instead of ascii 
  560. values. The following is a key code version of the same binding: 
  561.  
  562.       bind '\0x03' <cs> forwardChar
  563.  
  564. The key code for any given key can be obtained by using the 'keyCode' 
  565. function. Note that menu item command equivalents take precedence over 
  566. bindings, and that the 'bind' command does not affect the command 
  567. equivalents displayed in the menus. Command equivalents can only be changed 
  568. by using an external tool like 'ResEdit'. Also note that key code bindings 
  569. take precedence over ascii bindings. 
  570.  
  571. ==============================================================================
  572. = User-Defined Menus
  573. ==============================================================================
  574.  
  575. Alpha allows the the user to build custom menus which contain names of 
  576. functions, macros, or arbitary TCL commands that just HAVE to be in the 
  577. menus, as opposed to being merely callable through the bindings. The 
  578. syntax is dead simple. Menus can be nested, allowing heirachical menus to 
  579. be defined. See the 'AlphaBits.tcl' file for examples (only the first 
  580. three Alpha menus are hard-coded into the Application, the others are set 
  581. up through the AlphaBits file). The following meta characters can be 
  582. embedded in the strings:
  583.  
  584.    Meta-character     Usage
  585.    --------------     -----
  586.  
  587.     ; or Return       Separates multiple items.
  588.     ^                 Followed by an icon number, adds 
  589.                       that icon to the item.
  590.     !                 Followed by a character, marks the
  591.                       item with that character.
  592.     <                 Followed by B, I, U, O, or S, sets 
  593.                       the character style of the item.
  594.     /                 Followed by a character, sets up
  595.                       a keyboard equivalent.
  596.     (                 Disables the item.
  597.  
  598. The menu creation syntax is :
  599.  
  600.     menu <name> "Tcl list of items"
  601.  
  602. Once the menus are created, they can be inserted and  deleted from the 
  603. menu bar by the syntax:
  604.  
  605.    insertMenu "name"
  606.    deleteMenu "name"
  607.  
  608. as well as through macros.
  609.  
  610. The following strings have the obvious special meanings when used as menu 
  611. item text:
  612.   FLAGMENU
  613.   VARMENU
  614.   FSETMENU
  615.   WINDOWMENU
  616.  
  617. The 'WINDOWMENU' (the menu that allows selection of windows) cannot be 
  618. redefined after startup and can only be used in one menu.
  619.  
  620. Alpha attempts to make procedure names readable in the menus by separating 
  621. words at any capitalized letter. For example, 'findFile' becomes "Find 
  622. File".
  623.  
  624. Menu items can be enabled and disabled through the TCL command 
  625. 'hiliteMenuItem'.
  626.  
  627.  
  628. ==============================================================================
  629. = Suffix Hooks
  630. ==============================================================================
  631.  
  632.  
  633. Alpha executes the TCL commands "openHook", "closeHook", "activateHook", 
  634. "suspendHook", and "resumeHook" when the corresponding events occur. 
  635. Default implementations for these commands are in the file 'proc.tcl'. 
  636. These commands can be modified to perform arbitrary commands, including 
  637. saving of files, implementation of per-window variables, etc.
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665. ==============================================================================
  666. = Searching
  667. ==============================================================================
  668.  
  669.  
  670. ALPHA has a full repertoire of searching commands. The 'find' command 
  671. brings up a dialog allowing the text to be searched for, replacement text, 
  672. and the variables 'forward', 'ignoreCase', 'regExpr', and 'matchWords' to 
  673. be set. Once these have been defined, the 'Search' menu contains several 
  674. commands for repeated searching, replacing, etc.
  675.  
  676. ==============================================================================
  677. ==== Regular Expressions
  678. ==============================================================================
  679.  
  680. If the variable 'regExpr' is true, the search functions interpret the 
  681. search text as regular expressions, which have the following elements:
  682.  
  683.  c        literal char.
  684.  ^        beginning of line.
  685.  $        end of line.
  686.  .        any character except carriage return.
  687.  [...]    character class, can use ranges such as '0-9'.
  688.           inside classes. Matches one character of the 
  689.           enclosed choices. Ex: '[ac0-2]' matches 'a', 
  690.           'c', '0', '1', or '2'.
  691.  [^...]   negated character class, matches anything but
  692.           the enclosed characters. ']' can be included
  693.           by putting it immediately after the '^'.
  694.  \t       tab.
  695.  \r       carriage return or line break.
  696.  *        zero or more occurrences of the previous
  697.           pattern. Ex: 'ab*' matches 'a', 'ab', 'abb',
  698.           'abbb' etc.
  699.  +        one or more occurrences of the previous 
  700.           pattern. 
  701.  ?        zero or one occurrences of the previous 
  702.           pattern. Ex: 'ab?' matches 'a' or 'ab'.
  703.  a|b      matches either a or b. If enclosed in
  704.           parenthesis, the extent of the alternated
  705.           expressions is limited. Ex: (pete|bob) 
  706.           matches either 'pete' or 'bob'.
  707.  (...)    The interior elements are grouped together. 
  708.  
  709. Regular expressions constructed from the above elements can be 
  710. concatenated to create larger expressions. 
  711.  
  712. The parenthesis also define substrings of the total matched string that 
  713. can be used either later during substitution. The substring delimited by 
  714. the pair of parenthesis that includes the nth left paren is denoted \n, 
  715. where n is 1, 2, .... 9.  '\0' and '&' both refer to the matched text.
  716.  
  717. EXAMPLE: 
  718. The following regular expression will match either 'aabox' or 'bbbox':
  719.  
  720.               (aa|bb)box
  721.  
  722.  
  723. Regular expressions can be very difficult to master, but they the 
  724. following section shows how useful they can be.
  725.  
  726. ==============================================================================
  727. = Incremental Searches
  728. ==============================================================================
  729.  
  730. Emacs users will be happy that both forward and backward incremental 
  731. searches are implemented. Incremental searches bypass the normal search 
  732. dialog and search for the current text after each keystroke. The result is 
  733. often much faster and less intrusive. Executing either while an incremental 
  734. search is in progress causes the search to proceed to the next instance of 
  735. the current text. Incremental search mode is exited when any other command 
  736. (executed through the menus or through bindings that include at least one of 
  737. the control key and the option key) is executed, or when the escape or 
  738. delete key is used. 
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764. ==============================================================================
  765. = 'C' Tags
  766. ==============================================================================
  767.  
  768.  
  769. ALPHA supports the use of tags to find declarations of functions. When 
  770. searching for a tag, ALPHA looks for the tag file specified by the 
  771. "tagFile" string variable. ALPHA's tag generating routines use the regular 
  772. expression in the string variable "funcExpr" to look for function 
  773. declarations. In other words, we don't parse the text. If you declare your 
  774. functions differently, you can change " funcExpr" to suit your own style. 
  775. Alpha currently uses the following regular expression to find C function 
  776. declarations:
  777.  
  778.               ^[^ \t#\r/@][^\r]*\([^\r]*\)$
  779.  
  780. (NOTE: the above expressions won't pick up many C++ method definitions. To 
  781. pick them up, add a question mark '?' after the last right parenthesis.) 
  782. Although complicated, this expression makes sense if you slowly wade 
  783. through it. The string that we are looking for must take up an entire 
  784. line. It must begin with a character other than '\t', '#', '\r', '/', ' ', 
  785. or '@'. There must be a set of parenthesis.   
  786.  
  787. Note that not only can you customize this to your style of 'C' 
  788. declarations, you could also use it to generate tags for other languages. 
  789. The only thing you need to bear in mind is that the tag routines use the 
  790. complete word previous to the first '(' in the selected line as the 
  791. function's name. If there is no '(' in the selected line, the last word in 
  792. the line is used. Therefore, Pascal procedures w/ or w/o parameters can be 
  793. identified.
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801. ==============================================================================
  802. = "Fill" Routines
  803. ==============================================================================
  804.  
  805.  
  806. The "fill" and "wrap" routines reformat text to specified line lengths. 
  807. This is useful in two case. First, word processors such as Microsoft Word 
  808. only insert carriage returns at the end of paragraphs. Secondly, while 
  809. typing and inserting text into pre-existing paragraphs, the line lengths 
  810. become unequal. 
  811.  
  812. The "wrap" routine handles word processor documents quickly by merely 
  813. inserting carriage returns as necessary to ensure all lines in the 
  814. selected region are shorter than specified by the variable 'fillColumn'. 
  815. Alpha asks the user if wrapping should be done whenever the user opens 
  816. files that have lines longer than 'paraColumn' characters.
  817.  
  818. The TCL routines 'fillRegion' and 'fillParagraph' go further. Not only do 
  819. they break lines, but they also coalesce lines to eliminate short lines. 
  820. Both routines work by stripping the relevent text of white space, then 
  821. re-inserting white space and carriage returns so that no line extends past 
  822. 'fillColumn' characters in length and begins with 'leftFillColumn' spaces 
  823. characters. Both routines are implemented in the file 'procs.tcl', and 
  824. therefore different definitions of paragraphs can be accomodated by 
  825. modifing the appropriate TCL procedures.
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839. ==============================================================================
  840. = Titlebar Menus
  841. ==============================================================================
  842.  
  843.  
  844. If the value of the variable 'showMenuHeads' is non-zero, every text 
  845. window contains two boxes in the title bar. The first is by default 
  846. entitled "Func"  and the second, "Mark". Depressing the mouse in these 
  847. boxes bring up popup menus. 
  848.  
  849. The "Func" menu uses the regular expression defined by the string variable 
  850. 'funcExpr' to create a popup menu containing a sorted list of all function 
  851. definitions in the current file. Using regular expressions this way is not 
  852. going to pick up all function definitions if your coding style is very 
  853. different than what Alpha expects. If this is the case, you may need to 
  854. play with the definition for 'funcExpr'.
  855.  
  856. Selecting an item from this menu immediately displays the definition of 
  857. that function. If the 'shift' key is depressed when the menu is created, 
  858. the methods menu is not sorted. The 'sortedIsDefault' var reverses these 
  859. semantics.
  860.  
  861. The "Mark" menu displays a list of all permanent marks in the current 
  862. file. Selecting an item from the menu causes the insertion to be placed at 
  863. the corresponding mark.
  864.  
  865. The behavior of the function menu can be changed dramatically by the user. 
  866. The method-func routine uses 'funcExpr' to locate a line containing a C 
  867. definition, and then another routine extracts the function name. 
  868.  
  869. If the variable 'funcTitle' is set to "Func", the label of the menu is 
  870. "Func" and for each match found, a menu item is created with the text of 
  871. the last word before the first left parenthesis in the match. For example, 
  872. if the following is matched text: 
  873.  
  874.     this is matched text (one (silly))
  875.  
  876. the word 'text' would be inserted into the popup menu as an item.
  877.  
  878. If 'funcTitle' is not set to "Func", then the two things happen. First, the 
  879. contents of 'funcTitle' are used as the label for the func popup box. 
  880. Second, Alpha adds a menu item constructed from the text inside the 
  881. 'funcPar'th parenthesized expression in the match, where 'funcPar' is an 
  882. Alpha variable of the same name. Note that the parenthesis in this case are 
  883. part of the regular expression, the actual text may not have parenthesis at 
  884. all, and probably doesn't. For more information on this, look at the manual 
  885. page for regular expressions (in the "Help" menu). 
  886.  
  887. See the startup files for examples of both methods.
  888.  
  889.  
  890.  
  891.  
  892. ==============================================================================
  893. = Defining and Using File Sets
  894. ==============================================================================
  895.  
  896. File Sets are lists of files that Alpha uses for multiple-file searches and 
  897. tag searches, among other things. Typically, a user will set up several 
  898. different file sets in the AlphaBits.tcl file, perhaps one specifying all 
  899. the source files in a project, another specifying all the Mac include 
  900. files, and another specifying all the UNIX include files. When a command 
  901. using file sets is initiated, Alpha evaluates the command"getCurrFileSet", 
  902. which returns a list of complete pathnames to search. Some of the lists are 
  903. set up explicitly (see the 'noGlobNecessary' definition in "procs.tcl"), 
  904. while other file sets are defined at startup time through the use of file 
  905. globbing. See the TCL manual page for a definition of "glob"ing. The 
  906. definition of the variable "globNecessary" in "procs.tcl" shows how to to 
  907. this. 
  908.  
  909. Functions that use file sets operate on the "current" fileset, which is 
  910. specified by the 'fileSet' variable. The current file set can also be 
  911. switched by using  the "File Set" heirarchical menu. 
  912.  
  913.  
  914. 5.02 includes a new Tcl proc 'addFileset', which allows a fileset to be 
  915. created on the fly (Unfortunately, there is currently a bug in the handling 
  916. of this routine that eventually crashes the system, use with care). This 
  917. fileset remains usable until Alpha is restarted. It should be quite simple 
  918. to use Tcl to make this new fileset permanent. A Tcl proc could also be 
  919. written to create a heirarchical menus that has a submenu for each fileset, 
  920. the items of each submenu being the files for that fileset. However, I'm 
  921. not going to write everything... 
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936. =============================================================================
  937. = Keyboard Macros
  938. =============================================================================
  939.  
  940.  
  941. Defining and Using Keyboard Macros 
  942. ALPHA supports keyboard macros which record a sequence of keystrokes to be 
  943. played back later w/ the function 'executeKeyboardMacro' (this function is 
  944. also in the 'Utilities' menu) or written into a buffer by selecting 'Dump 
  945. Function' from the 'Utilities' menu. The dump function prompts you for a 
  946. macro name, which must consist only of letters of the alphabet, digits, 
  947. and '_'. 
  948.  
  949. These macro declarations can then be edited, loaded, and bound to 
  950. keystrokes. Loading a macro or a binding is accomplished by hiliting the 
  951. text and selecting the "Load Selection" item of the 'Customize' window. If 
  952. no text is hilited, the entire window is loaded by the same command. 
  953. Macros can be bound to keys in exactly the same manner as functions (see 
  954. above). 
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973. =============================================================================
  974. = Undo + Redo
  975. =============================================================================
  976.  
  977.  
  978. ALPHA supports unlimited undo and redo. This means that most changes can 
  979. be undone, and then redone, at will. Bear in mind that once you create new 
  980. modifications, all changes that you have undone but not redone are lost. 
  981. Another point to bear in mind is that saving a buffer to disk currently 
  982. flushes the undo buffer. 
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. =============================================================================
  1011. = Using Think C
  1012. =============================================================================
  1013.  
  1014.  
  1015. Closed environments like Think present problems to the developer using 
  1016. other tools. However, the following tips should help:
  1017.  
  1018. • After editing with Alpha, hit the 'Use Disk' button from the 'Build' 
  1019. menu item to force Think to check modification times for a build.
  1020.  
  1021. • Move all your project source files into a single directory. Then insert 
  1022. a new entry into the 'noGlobNecessary' section of file "procs.tcl" w/ 
  1023. file pattern *.c.
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042. =============================================================================
  1043. = Rectangular Editing
  1044. =============================================================================
  1045.  
  1046.  
  1047. If the option key is pressed while the mouse is dragged,  a rectangular 
  1048. section of text is selected instead of the normal selection. This 
  1049. rectangular selection may extend over multiple lines, but contains only 
  1050. text between the column of the drag start and the column of the drag end. 
  1051. The drag cannot end on a column or row less than the start. This selection 
  1052. can be extended by option-shift-mouse, but not dragged further.
  1053.  
  1054. The rectangular selection can be deleted, copied, and pasted. This is very 
  1055. useful for tables and arrays, such as in LaTeX. Usually, the operation 
  1056. will be intuitive. However, if you use proportional fonts the selection 
  1057. may appear ragged. If some of the line contain tabs, the result may not be 
  1058. want you want. Converting tabs to spaces in the desired region before 
  1059. attempting rectangular selection usually fixes the problems. 
  1060.  
  1061. The most natural semantics of rectangular selection aren't obvious. I 
  1062. chose to implement it in a similar fashion to that of Microsoft Word. 
  1063. Preditor does it in another way, and has many bugs (and it's  commercial, 
  1064. hah!).
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079. =============================================================================
  1080. = Using LaTeX
  1081. =============================================================================
  1082.  
  1083.  
  1084. As I am starting to write papers on my Mac using OzTeX, Alpha may migrate 
  1085. increasingly into the realm of LaTeX users. For starters, LaTeX support 
  1086. includes:
  1087.  
  1088. • automatic word-wrapping.
  1089. • fill paragraph and fill region commands.
  1090. • support for changing paragraph definitions 
  1091.    so that a backslash limits paragraph extent.
  1092. • rectangular editing mode, useful for working
  1093.    with tables and arrays.
  1094. • title-bar section menu.
  1095. • suffix hook for .tex (see the section on suffix 
  1096.    hooks) that can automatically enable all this.
  1097.  
  1098. The only one of the above items that hasn't been explained is the 
  1099. title-bar section menu, which is specified by appropriate settings of 
  1100. 'funcExpr', funcTitle', and 'funcPar'. For files ending in ".tex", the 
  1101. title-bar contains a box labeled "Sect". Clicking on this box creates a 
  1102. popup menu containg all section definitions in the current file. Selecting 
  1103. one puts the cursor at the beginning of the section. See the Popup Menus 
  1104. section and the startup files for more information.
  1105.  
  1106. In addition, distributions from 4.01 on include a folder of 
  1107. user-contributed TeX/LaTeX macros.
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116. ============================================================================= 
  1117. = Variables 
  1118. ============================================================================= 
  1119. Alpha supports two different kinds of variables. The following "Alpha 
  1120. variables" are available under the "Utils" menu and are set and queried 
  1121. using the tcl functions 'setVar' and 'getVar'. The second kind of 
  1122. variable, not enumerate below, are simple Tcl variables. Tcl variables 
  1123. are set using the Tcl command 'set', and queried using the $var syntax. 
  1124. Tcl variable values are not available through any menus.
  1125.  
  1126. autoSave       • If TRUE, buffers (except untitled buffers) are automatically
  1127.                  saved every 'changesLim' changes.
  1128. backExtension  • suffix to add to file name to create
  1129.                  name of backup file. Initially ".BAK".
  1130. backup         • if TRUE, Alpha makes a backup of 
  1131.                  every file before writing new data.
  1132. backupFolder   • if 'backupFolder' is true and the folder named by 
  1133.                  'backupFolderName' is on the same volume as the original, the 
  1134.                  backup file is created in the 'backupFolderName' folder.
  1135. backupFolderName • name of folder to place backups.
  1136. bwWindows      • if true, Alpha will use 1-bit windows
  1137.                  even if color is available. This speeds
  1138.                  refresh quite a bit on slow color 
  1139.                  machines such as the IIsi.
  1140. changesLim     • number of changes to a window before 
  1141.                  garbage collection or autosave is done.
  1142. currFileSet    • name of currently selected file set.
  1143. defaultFont    • font to use on new windows and files 
  1144.                  which don't have associated font 
  1145.                  specification resources.
  1146. defHeight      • If 'fullScreen' set, this is default 
  1147.                  height in pixels.
  1148. defWidth       • If 'fullScreen' set, this is default 
  1149.                  width in pixels.
  1150. elecLBrace     • Electric 'C' left brace on.
  1151. elecRBrace     • Electric 'C' right brace on.
  1152. electricSemi   • Electric 'C' semicolon on.
  1153. fillColumn     • Number of columns use as limit for
  1154.                  "fill" routines. See 'leftFillColumn'
  1155. fontSaving     • if '-1', Alpha never saves font info,
  1156.                  if '1', Alpha always saves font info,
  1157.                  '0', Alpha saves font info if the font
  1158.                  or size is different than the default.
  1159. fontSize       • Default size of fonts used to display 
  1160.                  files.
  1161. forward        • set when searching forward. The 
  1162.                  'findFile' dialog always resets this 
  1163.                  before displaying.
  1164. fullNames      • Windows display pathnames instead of 
  1165.                  mere file names.
  1166. fullScreen     • If on, all windows are start in the 
  1167.                  same place, and have the dimension 
  1168.                  specified by 'defHeight' and 
  1169.                  'defWidth'.
  1170. funcPar        • Used in defining the "Func" title-bar menu, see Alpha 
  1171.                    help.
  1172. funcExpr       • Set to the regular expression that 
  1173.                  ALPHA uses to find function 
  1174.                  declarations.
  1175. funcTitle      • Text to put in title-bar menu header.
  1176.                  See the Popup-Menus section for more
  1177.                  information.
  1178. ignoreCase     • Search is case-insensitive.
  1179. includePath    • A list of the path-names of the 
  1180.                  directories to search for include 
  1181.                  files, separated by semi-colons, such
  1182.                  as:
  1183.                    "Disk:C:edit;Disk:C:THINK C:include;"
  1184.                  The current directory can be included
  1185.                  by using consecutive semi-colons as:
  1186.                  "Disk:C:edit;Disk:C:THINK C:inc;;"
  1187. indentOnCR     • Auto-indent on carriage return.
  1188. leftFillColumn • Number of blanks left at beginning of 
  1189.                  lines by 'fill' routines. 
  1190. matchWords     • Match words on searches.
  1191. moveInsertion  • if true, 'pageBack' and 'pageForward'
  1192.                  move the insertion point
  1193. noRemapOption  • When set, does not overlay system
  1194.                  resource w/ one that does not have
  1195.                  "dead keys". If TRUE, some option 
  1196.                  sequences are not usable. Owners of
  1197.                  foreign keyboard will want this turned
  1198.                  on. Default: TRUE.
  1199. numWinsToTile  • specifies the number of windows tile
  1200.                  commands should affect.
  1201. openAllFIles   • if true, or it option key down, files 
  1202.                  of all types are openable, not just
  1203.                  'TEXT'.
  1204. optionIsMeta   • If set, the key combination with escape
  1205.                  is used instead of the option key
  1206.                  combination. Note that some 
  1207.                  combinations with option chars are
  1208.                  dead keys.
  1209. paraColumn     • Alpha automatically wraps files
  1210.                 that contains lines longer than this. 
  1211. posActivate    • If true, then merely moving the mouse
  1212.                  over a window activates. For those
  1213.                  X11-twm lovers.
  1214. powerThumb       • If true, vertical scrollbars have power thumbs.
  1215. protoFile      • name of file to dump prototypes into.
  1216. regExpr        • flag set if searchAgain should look
  1217.                  for a regular expression
  1218. savedState       • set to either "mpw", "think", or "none" depending on what 
  1219.                  you wish the default behavior to be in terms of what goes into 
  1220.                  the resource fork of the applications you modify. See the "Files" 
  1221.                  section of this file for more information.
  1222. showRowCol     • if set, row and col are continuously
  1223.                  displayed in the title bar. 
  1224. showMenuHeads  • If set, the function and mark menus can 
  1225.                  be selected from the title bar.
  1226. sortColumn     • column to use for sort routine.
  1227. sortedIsDefault• if set, sorted is the default for 
  1228.                  function and section menus.
  1229. startWithNew   • When one, ALPHA comes up w/ new 
  1230.                  buffer. When 0, ALPHA comes up w/
  1231.                  a prompt for a file. When 2, ALPHA
  1232.                  comes up w/ nothing.
  1233. suppressHeader • Suppress header on printed pages.
  1234. tabSize        • Default number of characters per tab.
  1235. tagFile        • complete path-name of tag file
  1236. tempMem        • if zero, Alpha will not use temporary
  1237.                  memory.
  1238. undoOn         • used to turn undo on and off. When undo
  1239.                  is turned off, all undo info is lost.
  1240.                  Useful when doing global replaces, etc.
  1241. useTempMem     • toggles whether Alpha will use 
  1242.                  temporary memory with System 7.0.
  1243. undonOn           • If true, undo information kept.
  1244. wordWrap       • if true, lines exceeding 'fillColumn'
  1245.                  in length are automatically wrapped
  1246.                  during normal text insertion (typing)
  1247.  
  1248.  
  1249.  
  1250. =============================================================================
  1251. = The (Dreaded) Option Key
  1252. =============================================================================
  1253.  
  1254.  
  1255. ALPHA's default setup uses the command key like any other mac application. 
  1256. Problems arise in ALPHA's emulation of emacs key bindings. Emacs uses an 
  1257. escape key and a control key.  Alpha's default configuration is set up for 
  1258. Mac II's. Emacs's escape and control keys are emulated by the Mac's 
  1259. corresponding keys. For Mac+'s, however, the situation is much more 
  1260. complicated. They don't have an escape key, so the the backquote key, '`', 
  1261. must be used instead. This can be set up by uncommenting the appropriate 
  1262. line in the "AlphaBits.tcl" file. Also, Mac+'s don't have control keys, so 
  1263. the option key can be used instead.  However....
  1264.  
  1265. Using the option key isn't quite that simple. First, the option key is 
  1266. already used in two contexts. There may be other option bindings. Also, if 
  1267. the variable 'optionIsEscape' is set, the option key is treated as if it 
  1268. is an escape so as to allow single keystroke calls of Alpha functions. In 
  1269. order to use the option key as an escape key, this variable must be set to 
  1270. zero in the AlphaBits file. Also, all the relevant bindings must have 
  1271. their modifier strings changed from using 'z' to 'o'.
  1272.  
  1273. There are other problems. Several option combinations are "dead keys" 
  1274. (option-e, option-o....), they are used to create bizarre (sorry to y'all 
  1275. non-Amuricans) characters through multiple keystrokes. Alpha can fix this 
  1276. by overlaying the system 'KCHR' resource with a private modified resource. 
  1277. This happens at startup time if the "AlphaBits.tcl" file specifies a zero 
  1278. value for the variable 'noRemapOption'. Unfortunately, this is just a US 
  1279. version of the resource, it won't work "fur the non-Amuricans".
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291. =============================================================================
  1292. = System Software 7.0 and Alpha
  1293. =============================================================================
  1294.  
  1295.  
  1296. Alpha is 32-bit clean and high-level event aware. However, Alpha currently 
  1297. only supports only the four "required" high-level events: OpenApp, 
  1298. OpenDoc, PrintDoc, and QuitApp. If I ever get hold of this mythical Apple 
  1299. Events Registry I intend to support other events, such as those having to 
  1300. do with spell checking, for example. 
  1301.  
  1302. In addition, there is always the (faint) possibility that Symantec will 
  1303. open up their system to third-party editors. If so, I'll accommodate their 
  1304. events as soon as they publish them. I am unable to work with MPW as I 
  1305. don't own it, but my understanding is that they do not yet supports 
  1306. "error" apple events, as I hope they eventually will.
  1307.  
  1308. Under 7.0, Alpha uses temporary memory to accommodate large files. This 
  1309. allows you to open multi-megabyte files even when Alpha's partition is set 
  1310. only at 512k, if the system has that much memory available. Note that 
  1311. using temporary memory makes that much memory unavailable to other 
  1312. applications. Contrary to all admonishments, Alpha does not unlock 
  1313. temporary memory across WaitNextEvent calls and may eventually use all the 
  1314. memory in your system. You can turn this feature off through 'useTempMem'.
  1315.  
  1316. Note, however, that the clipboard is allocated by the system in Alpha's 
  1317. heap, and therefore cannot take advantage of temporary memory.
  1318.  
  1319. Alpha 3.6 has new color icons. You may need to rebuild your desktop in 
  1320. order to see them.
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328. =============================================================================
  1329. = File Formats
  1330. =============================================================================
  1331.  
  1332.  
  1333. Alpha reads and writes files stored in three (or maybe four) different 
  1334. formats. The three main formats are mac (lines end with a carriage 
  1335. return), unix (lines end with linefeed), and IBM pc (lines end with both 
  1336. carriage return and linefeed. Typical, isn't it?).
  1337.  
  1338. Alpha will transparently read and write all three of these formats. You 
  1339. don't have to do anything special to use different formats, but the 
  1340. 'SaveAs...' dialog allows you to specify the format that a file is written 
  1341. in through the 'Format' button.
  1342.  
  1343. The fourth file format is just a modification of the ordinary mac format. 
  1344. Word processors such as Microsoft Word and MacWrite only put carriage 
  1345. returns at the end of paragraphs, so that they can wrap  the paragraphs on 
  1346. the fly. This is what is referred to as 'paragraph format' in the rest of 
  1347. the help text. Alpha does not transparently convert to and from this 
  1348. format because there are valid reasons why someone might want to edit a 
  1349. paragraph formatted file while not in paragraph mode. 
  1350.  
  1351. Therefore, when Alpha detects reads a paragraph-mode file, it asks the 
  1352. user whether or not to remap it. Files can be mapped back to paragraph 
  1353. mode by setting 'fillColumn' to a very large number and executing 
  1354. 'fillRegion' on the text.
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364. =============================================================================
  1365. = Tips and other Miscellaneous Diversions...
  1366. =============================================================================
  1367.  
  1368.  
  1369. • When a window is "dirty" (has unsaved changes), a 
  1370.   diamond appears in the title bar and next to the
  1371.   corresponding item in the Windows menu.
  1372.  
  1373. • All dialogs that have editable text can use the Cut, 
  1374.   Copy, and Paste menu command equivalents.
  1375.  
  1376. • In all dialogs, non-editable controls can be selected 
  1377.   by typing Command-<first char of control>. If there 
  1378.   are no editable controls in the dialog, simply typing 
  1379.   the first letter of the desired control suffices.
  1380.  
  1381. • Dirty windows are marked with a diamond in the 
  1382.   window's title bar. The corresponding menu items in 
  1383.   the 'Window' menu will also have a diamond mark next 
  1384.   to it.
  1385.  
  1386. • Set the flag 'undoOn' to 0 in order to speed up long 
  1387.   replace-all and macro modifications.
  1388.  
  1389. • After a piece of text has been yank'd or paste'd, the 
  1390.   'mark' is set to the beginning of the new text and the
  1391.   selection is at the end. 'markHilite' will now hilite 
  1392.   the entire insertion. This is especially useful when
  1393.   moving code. Cut the code, insert at a new position,
  1394.   select the inserted text by selecting "Edit:Hilite", and 
  1395.   then use "Edit:Shift Left" and "Edit: Shift Right" to move
  1396.   the text to the proper indentation.
  1397.  
  1398.  
  1399.  
  1400.